#ifndef SDR_H_
#define SDR_H_

#include "recbase.h"
#include "rectype.h"
#include "stdffield.h"
#include <string>
#include <vector>

namespace opsrc {
    namespace stdf {

        class Sdr : public opsrc::stdf::RecBase
        {
        public:
            Sdr(stdf_rec stdfrec,  int reclen, std::ios::pos_type fileRecFirstBytePosition, int orderindex, endian e, char* buf);
            virtual ~Sdr();

            const StdfField<int> getHeadNum() const;
            void setHeadNum(StdfField<int> headnum);

            const StdfField<int> getSiteGroup() const;
            void setSiteGroup(StdfField<int> sitegrp);

            const StdfField<int> getSiteCount() const;
            void setSiteCount(StdfField<int> sitecnt);

            const StdfField<vector<unsigned int> > getSiteNum() const;
            void setSiteNum(StdfField<vector<unsigned int> > sitenum);

            const StdfField<string> getHandlerType() const;
            void setHandlerType(StdfField<string> handtyp);

            const StdfField<string> getHandlerId() const;
            void setHandlerId(StdfField<string> handid);

            const StdfField<string> getProbeCardType() const;
            void setProbeCardType(StdfField<string> cardtyp);

            const StdfField<string> getProbeCardId() const;
            void setProbeCardId(StdfField<string> cardid);

            const StdfField<string> getLoadBoardType() const;
            void setLoadBoardType(StdfField<string> loadtyp);

            const StdfField<string> getLoadBoardId() const;
            void setLoadBoardId(StdfField<string> loadid);

            const StdfField<string> getDibBoardType() const;
            void setDibBoardType(StdfField<string> dibtyp);

            const StdfField<string> getDibBoardId() const;
            void setDibBoardId(StdfField<string> dibid);

            const StdfField<string> getCableType() const;
            void setCableType(StdfField<string> cabltyp);

            const StdfField<string> getCableId() const;
            void setCableId(StdfField<string> cablid);

            const StdfField<string> getContactorType() const;
            void setContactorType(StdfField<string> conttyp);

            const StdfField<string> getContactorId() const;
            void setContactorId(StdfField<string> contid);

            const StdfField<string> getLaserType() const;
            void setLaserType(StdfField<string> lasrtyp);

            const StdfField<string> getLaserId() const;
            void setLaserId(StdfField<string> lasrid);

            const StdfField<string> getExtraEqptType() const;
            void setExtraEqptType(StdfField<string> extrtyp);

            const StdfField<string> getExtraEqptId() const;
            void setExtraEqptId(StdfField<string> extrid);

            void readFields(char *buf);

        protected:
            Sdr();

        private:
            StdfField<int> head_num;
            StdfField<int> site_grp;
            StdfField<int> site_cnt;
            StdfField<vector<unsigned int> > site_num;
            StdfField<string> hand_typ;
            StdfField<string> hand_id;
            StdfField<string> card_typ;
            StdfField<string> card_id;
            StdfField<string> load_typ;
            StdfField<string> load_id;
            StdfField<string> dib_typ;
            StdfField<string> dib_id;
            StdfField<string> cabl_typ;
            StdfField<string> cabl_id;
            StdfField<string> cont_typ;
            StdfField<string> cont_id;
            StdfField<string> lasr_typ;
            StdfField<string> lasr_id;
            StdfField<string> extr_typ;
            StdfField<string> extr_id;

            endian en;

            /*
HEAD_NUM U*1 Test head number
SITE_GRP U*1 Site group number
SITE_CNT U*1 Number (k) of test sites in site group
SITE_NUM kxU*1 Array of test site numbers
HAND_TYP C*n Handler or prober type length byte = 0
HAND_ID C*n Handler or prober ID length byte = 0
CARD_TYP C*n Probe card type length byte = 0
CARD_ID C*n Probe card ID length byte = 0
LOAD_TYP C*n Load board type length byte = 0
LOAD_ID C*n Load board ID length byte = 0
DIB_TYP C*n DIB board type length byte = 0
DIB_ID C*n DIB board ID length byte = 0
CABL_TYP C*n Interface cable type length byte = 0
CABL_ID C*n Interface cable ID length byte = 0
CONT_TYP C*n Handler contactor type length byte = 0
CONT_ID C*n Handler contactor ID length byte = 0
LASR_TYP C*n Laser type length byte = 0
LASR_ID C*n Laser ID length byte = 0
EXTR_TYP C*n Extra equipment type field length byte = 0
EXTR_ID C*n Extra equipment ID length byte = 0

*/

        };

    }
}
#endif /*SDR_H_*/
